package com.example.common;


import lombok.Getter;

/**
 * 枚举类
 */
@Getter
public enum StatusCode {

    USER_NOT_EXIST("用户不存在", 1001),

    PASSWORD_ERROR("用户密码错误", 1002),

    MENU_EXIT_CHILDREN("存在子级菜单不能删除", 1003),

    USER_OR_PASSWORD_ERROR("用户名或密码不能为空", 1004),

    CHECK_CODE_ERROR("验证码错误", 1005),

    LOGIN_TIMEOUT("登录失效", 1006),

    NOT_PERMISSION("无权限", 1007),

    SYSTEM_ERROR("系统异常", 5000),

    OLD_PASSWORD_ERROR("旧密码不正确", 1008),

    PAASWORD_NOT_COMMON("密码不一致", 1008),

    USER_ALREADY_EXIST("用户名已存在", 1009),

    PHONE_ALREADY_EXIST("手机号已存在", 1010);


    private String name;

    private Integer code;

    StatusCode(String name, Integer code) {
        this.name = name;
        this.code = code;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

}
